<%--
    Document   : phoneBookResult.jsp
    Created on : 2010. 12. 5, 오후 8:25:14
    Author     : jeffreyha
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
<!--        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">-->
        <title>JSP Page</title>

    <%
        HttpSession httpSession = request.getSession();

        int nowPage = (String) request.getAttribute("nowPage") == null ? 0 : Integer.parseInt((String) request.getAttribute("nowPage"));
        int queryCount = (String) request.getAttribute("queryCount") == null ? 0 : Integer.parseInt((String) request.getAttribute("queryCount"));

        int totalPage = (String) request.getAttribute("totalPage") == null ? 0 : Integer.parseInt((String) request.getAttribute("totalPage"));
        int totalCount = (String) request.getAttribute("totalCount") == null ? 0 : Integer.parseInt((String) request.getAttribute("totalCount"));

        int returnValue = (String) request.getAttribute("returnValue") == null ? 0 : Integer.parseInt((String) request.getAttribute("returnValue"));

    %>
    </head>

<script language ="javascript">
        function loadingMessage(){
            if('<%=returnValue%>' > 0){
                alert("Success !!");
            }else{
                alert("Fail !!");
            }
            
            var form = document.phoneBookResultForm;
            form.target = "main";
            form.action = "PhoneBookServlet?serviceId=getPhoneBookManager&nowPage=1&queryCount=10";
            form.submit();

            form.target = "subMain";
            form.action = "PhoneBookServlet?serviceId=getPhoneBookList&nowPage=1&queryCount=10";
            form.submit();

        }

</script>
                
    <body onload ="loadingMessage();">
        <FORM id ="phoneBookResultForm" name="phoneBookResultForm" method="post" action ="" accept-charset="UTF-8">

        </FORM>
    </body>
    
</html>
